package com.example.spring0909.section4.service.impl;

import org.springframework.stereotype.Service;
import com.example.spring0909.section4.dao.ProductDao;
import com.example.spring0909.section4.entity.Product;
import com.example.spring0909.section4.service.ProductService;

import javax.annotation.Resource;

/**
 * 商品(Product)表服务实现类
 *
 * @author makejava
 * @since 2022-04-19 22:55:59
 */
@Service("productService")
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductDao productDao;



    /**
     * 新增数据
     *
     * @param product 实例对象
     * @return 实例对象
     */
    @Override
    public Product insert(Product product) {
        this.productDao.insert(product);
        return product;
    }

  }
